import Vue from "vue";
import Vuex from "Vuex";
Vue.use(Vuex);

import home from './home'
import search from './search'
import detail from "./detail";
import shopCart from './shopCart'
import register from './register'
import login from './login'
import trade from "./trade";
export default new Vuex.Store({
       modules:{
        home,
        search,
        detail,
        shopCart,
        register,
        login,
        trade
        }
 })
// export default new Vuex.Store({
//         actions:{
//                 add($store){
//                         $store.commit("ADD")
//                         // console.log(a)
//                 },
//                 decrease($store){
//                         $store.commit("DECREASE")
//                 }
//         },
//         mutations:{
//                 ADD(state){Cannot read properties of undefined (reading 'getters')
//                         state.count++;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
//                         // console.log(a)
//                 },
//                 DECREASE(state){
//                         state.count--;
//                 }
//         },
//         state:{
//                 count:1
//         }
// })       